#!/usr/bin/env python3

# Copyright (c) 2020-2021 Fpemud <fpemud@sina.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.


from ..._prototype import CustomAction


class InstallPython(CustomAction):

    name = "python"
    tags = ["python"]
    exes = [
        # {
        #     "arch": "x86",
        #     "version": "2.7.6",
        #     "urls": [
        #         "https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi",
        #         "https://cuckoo.sh/vmcloak/python-2.7.6.msi",
        #     ],
        #     "sha1": "c5d71f339f7edd70ecd54b50e97356191347d355",
        #     "filename": "python-2.7.6.msi",
        #     "window_name": "Python 2.7.6 Setup"
        # }, {
        #     "arch": "x86",
        #     "version": "2.7.13",
        #     "urls": [
        #         "https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi",
        #         "https://cuckoo.sh/vmcloak/python-2.7.13.msi",
        #     ],
        #     "sha1": "7e3b54236dbdbea8fe2458db501176578a4d59c0",
        #     "filename": "python-2.7.13.msi",
        #     "window_name": "Python 2.7.13 Setup"
        # },
        {
            "arch": "amd64",
            "version": "3.7.3",
            "target": "win7x64",
            "urls": [
                "https://www.python.org/ftp/python/3.7.3/python-3.7.3-amd64.exe",
            ],
            "sha1": "bd95399506f362e7618d4f6b5a429ebf44714585",
            "filename": "python-3.7.3-amd64.exe",
            "window_name": "Python 3.7.3 (64-bit) Setup",
            "install_path": "C:\\Python3"
        },
        {
            "arch": "amd64",
            "version": "3.10.0",
            "target": "win10x64",
            "urls": [
                "https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe",
            ],
            "sha1": "3ee4e92a8ef94c70fb56859503fdc805d217d689",
            "filename": "python-3.10.0-amd64.exe",
            "window_name": "Python 3.10.0 (64-bit) Setup",
            "install_path": "C:\\Python3"
        }

    ]
